|
In information theory and computer science, the Levenshtein distance is a string metric for measuring the difference between two sequences. Informally, the Levenshtein distance between two words is the minimum number of single-character edits (i.e. insertions, deletions or substitutions) required to change one word into the other. It is named after Vladimir Levenshtein, who considered this distance in 1965.〔 Appeared in English as: 〕 Levenshtein distance may also be referred to as edit distance, although that may also denote a larger family of distance metrics. It is closely related to pairwise string alignments. == Definition == Mathematically, the Levenshtein distance between two strings (of length and respectively) is given by where : where is the indicator function equal to 0 when and equal to 1 otherwise, and is the distance between the first characters of and the first characters of . Note that the first element in the minimum corresponds to deletion (from to ), the second to insertion and the third to match or mismatch, depending on whether the respective symbols are the same. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Levenshtein distance」の詳細全文を読む スポンサード リンク
|